Breaking out of nested loops in Java - Stack Overflow for (Type type : types) { for (Type t : types2) { if (some condition) { // Do ... (EDIT: Like other answerers, I'd definitely prefer to put the inner loop in a different method.